<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HelloWord</title>
</head>
<body>
<div id="app">
    <h2>{{name}}非常帅,
        有{{num}}辆法拉利。
    </h2>
    <button v-on:click="num++">点我</button>

    <button v-on:click="add">加</button>

</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            name: "缪明杰",
            num: 1
        },
        methods:{
            add :function () {
             this.num++;
            }
    }})
</script>
</body>
</html>